package thread;

/**
 * Created by Administrator on 2016/3/4.
 */
public class ThreadTest {
    public static void main(String[] args) throws InterruptedException {
        final Test t1 = new Test();
        final Test t2 = new Test();
        Thread t = new Thread(new Runnable() {
            public void run() {
//               t1.setStr("aaaaa");
                System.out.println(t1.getStr());
            }
        });
        Thread t3 = new Thread(new Runnable() {
            public void run() {
                t1.setStr("ccccc");
                System.out.println("执行没");
            }
        });
        t3.start();
        t.start();
        Thread.sleep(2000L);
//        System.out.println(t1.getStr());
    }
}
